#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include<map>


using namespace std;

const int N = 200010;
map<double,double> mp;
double q[N];
int n;
double t;
set<double> s;
int  res=0;
vector<double> ve;
long long  tem;

int main(){
    cin >> n;
    int tt = n;
    for(int i = 0; i < n; i ++)
    {
        cin>>t;
        // q[i] *=1e9;
        q[i] = t;
        q[i] *=1e9;
    }

    for(int i = 0; i < n; i++)
        for(int j = 0; j < i;j ++)
            {
                tem = q[i]*q[j];

                if(tem % 1000000000 == 0)
            {
                // cout << i+1<<" "<<q[i] << " " <<j+1<<" "<< q[j]<<endl;
                res++;
            }
            
            }
                // if()
                // 
            //res++;

    cout << res;

    return 0;
}
